package org.neptune.web.controller;

import org.neptune.api.entity.Seckill;
import org.neptune.api.request.SeckillRequest;
import org.neptune.common.response.LayuiTableResponse;
import org.neptune.service.service.SeckillGoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lwl
 * @date 2019/7/16 10:47
 */
@RestController
@RequestMapping("/seckillGoodsInfo")
public class SeckillGoodsInfoController {

	@Autowired
	private SeckillGoodsInfoService seckillGoodsInfoService;

	@RequestMapping("/querySeckillGoodsList")
	public LayuiTableResponse<Seckill> querySeckillGoodsList(SeckillRequest seckillRequest) {
		return LayuiTableResponse.success("",
				seckillGoodsInfoService.querySeckillCount(seckillRequest),
				seckillGoodsInfoService.querySeckillGoods(seckillRequest));

	}

}
